import 'package:dio/dio.dart';

extension RequestOptionsExtends on RequestOptions {
  int get startTime => (extra["startTime"] as int?) ?? -1;

  set startTime(int value) {
    extra["startTime"] = value;
  }

  String requestStr() {
    return "Url   : $uri \nMethod: $method \nHeads: $headers \nRequestBody: $data";
  }
}

extension ResponseExtends on Response {
  String responseStr() {
    return "Heads: ${headers.map} \nStatusCode: $statusCode \nBody: $data";
  }
}
